/*
 * Copyright (C) Hisilicon Technologies Co., Ltd. 2012-2019. All rights reserved.
 * Description: Function of glux1605b_cmos.h
 * Author: ISP SW
 * Create: 2012/06/28
 */

 #ifndef __GLUX1605B_CMOS_H_
 #define __GLUX1605B_CMOS_H_
 
 #ifdef __cplusplus
 #if __cplusplus
 extern "C" {
 #endif
 #endif
 
 #define GLUX1605B_SSP_ADDR    0
 #define GLUX1605B_SSP_DATA_BYTE   1
 
 #define GLUX1605B_I2C_ADDR    0x34
 #define GLUX1605B_ADDR_BYTE   2
 #define GLUX1605B_DATA_BYTE   1
 #define GLUX1605B_SENSOR_GET_CTX(dev, pstCtx) ((pstCtx) = glux1605b_get_ctx(dev))
 
 #define GLUX1605B_FULL_LINES_MAX 0xFFFFF
 #define GLUX1605B_FULL_LINES_MIN 2
 
 #define GLUX1605B_INCREASE_LINES  39
 #define GLUX1605B_VMAX_LINEAR    1270
 
 typedef enum {
     SHR_0_IDX,
     SHR_1_IDX,
     SHR_2_IDX,
     SHR_3_IDX,
     AGAIN_L_IDX,//LG
     AGAIN_H_IDX,//HG
     VMAX_L_IDX,
     VMAX_M_IDX,
     VMAX_H_IDX,
     HMAX_IDX,
     REG_A_L_IDX,
     REG_A_H_IDX,
     REG_MAX_IDX
 }glux1605b_linear_reg_index;
 
 ISP_SNS_STATE_S *glux1605b_get_ctx(VI_PIPE vi_pipe);
 ISP_SNS_COMMBUS_U *glux1605b_get_bus_Info(VI_PIPE vi_pipe);
 
 void glux1605b_init(VI_PIPE vi_pipe);
 void glux1605b_exit(VI_PIPE vi_pipe);
 void glux1605b_standby(VI_PIPE vi_pipe);
 void glux1605b_restart(VI_PIPE vi_pipe);
 HI_U8 glux1605b_read_register(VI_PIPE vi_pipe, HI_U16 addr) ;
 
 HI_U32 glux1605b_write_register(VI_PIPE vi_pipe, HI_U16 addr, HI_U8 data) ;
 #ifdef __cplusplus
 #if __cplusplus
 }
 #endif
 #endif /* End of #ifdef __cplusplus */
 #endif /* __GLUX1605B_CMOS_H_ */
 